#!/bin/sh
patch -p0 < $0
exit 0
Index: compiler/include/llvm/ADT/IntrusiveRefCntPtr.h
===================================================================
--- compiler/include/llvm/ADT/IntrusiveRefCntPtr.h (LLVM 3.5)
+++ compiler/include/llvm/ADT/IntrusiveRefCntPtr.h (cppamp-driver-ng-35)
@@ -197,6 +197,9 @@ public:
   private:
     void retain() { if (Obj) IntrusiveRefCntPtrInfo<T>::retain(Obj); }
     void release() { if (Obj) IntrusiveRefCntPtrInfo<T>::release(Obj); }
+
+    template <typename X>
+    friend class IntrusiveRefCntPtr;
   };
 
   template<class T, class U>
